package com.chen.librarysystem.service;

import com.chen.librarysystem.entry.User;
import com.chen.librarysystem.enumenrty.LogState;

import java.util.List;
import java.util.Map;

/**
 * 用户服务接口，定义了用户相关操作的方法
 */
public interface UserService {

    boolean isRegistered(String username, String password);

    void register(User user);

    Map<LogState, User> login(String username, String password);

    boolean changePassword(String username, String oldPassword, String newPassword);

    boolean updateUser(String username, User user);

    boolean deleteUser(String username);

    List<User> getAllUsers();

    User getUserByName(String username);
}

